﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.LangAnalyzer;
using UMLSynthesizer.LangAnalyzer.Elements;

namespace UMLSynthesizer.CSharpAnalyzer.Elements
{
    class CSharpExternalType : IExternalType
    {
        #region Constructor

        public CSharpExternalType(string identifier)
        {
            this.Identifier = identifier;

            this.MetricDictionary = new Dictionary<LanguageAnalyzer.Metrics, double>();
        }

        #endregion

        #region Properties

        public string Identifier { get; private set; }
        public ElementKinds Kind { get { return ElementKinds.ExternalType; } }
        public IElementBase ParentElement { get; private set; }
        public IProjectElement ProjectOwner { get; private set; }

        public IEnumerable<IClassElement> ContainedClasses { get { return new IClassElement[0]; } }
        public IEnumerable<IDelegateElement> ContainedDelegates { get { return new IDelegateElement[0]; } }
        public IEnumerable<IEnumElement> ContainedEnums { get { return new IEnumElement[0]; } }
        public IEnumerable<IFieldElement> ContainedFields { get { return new IFieldElement[0]; } }
        public IEnumerable<IInterfaceElement> ContainedInterfaces { get { return new IInterfaceElement[0]; } }
        public IEnumerable<IMethodElement> ContainedMethods { get { return new IMethodElement[0]; } }
        public IEnumerable<INamespaceElement> ContainedNamespaces { get { return new INamespaceElement[0]; } }
        public IEnumerable<IPropertyElement> ContainedProperties { get { return new IPropertyElement[0]; } }
        public IEnumerable<IStructElement> ContainedStructs { get { return new IStructElement[0]; } }

        public IEnumerable<IElementWithHeritageBase> BaseList { get { return new IElementWithHeritageBase[0]; } }

        public bool IsPrimitiveType { get { return Identifier.StartsWith("System."); } }

        public Dictionary<LanguageAnalyzer.Metrics, double> MetricDictionary { get; private set; }

        #endregion
    }
}
